package com.example.demo.dao;

import com.example.demo.entity.TbMessageForBlogEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.query.QueryByExampleExecutor;

import java.util.List;

public interface TbMessageForBlogDao extends JpaRepository<TbMessageForBlogEntity,Integer>, QueryByExampleExecutor<TbMessageForBlogEntity> {
    int countByBlogId(Integer blogId);
    Page<TbMessageForBlogEntity> findByBlogId(Integer blogId, Pageable pageable);
}
